package com.ruike.alisurface.http;

import com.ruike.alisurface.utils.ShareKey;
import com.voodoo.lib_frame.base.BaseView;
import com.voodoo.lib_frame.httpTools.ApiTools;
import com.voodoo.lib_frame.httpTools.RequestParams;
import com.voodoo.lib_utils.ShareUtils;

/**
 * 窦珊珊的项目接口
 */
public class DouShanShanHttp {

    private static String url = "http://120.78.219.34:9018/otherApi/blind_box/"; // 正式

    /**
     * 兑换取货码
     * take_code 取货码
     * mch_id 机器ID
     * 取货码出货信息
     */
    public static void getOut_goods_code(String code, BaseView apiListener) {
        ApiTools apiTools = new ApiTools();
        RequestParams pam = new RequestParams();
        pam.put("code", code);
        pam.put("mchid", ShareUtils.getInstance().getString(ShareKey.MCH_ID));
        apiTools.getRequest(url + "Android_StartOut", pam, apiListener);
    }

    /**
     * 完结订单
     *
     * @param codeid  取货码ID
     * @param OutInfo 是否出货完成
     */
    public static void QdEndOrder(String codeid, String OutInfo, BaseView apiListener) {
        ApiTools apiTools = new ApiTools();
        RequestParams params = new RequestParams();
        params.put("codeid", codeid);
        params.put("OutInfo", OutInfo);
        apiTools.getRequest(url + "Android_EndOut", params, apiListener);
    }

}
